/**
 * Company : TIS.
 * Created By : Chatree Siangklom
 * Created On : Aug 22, 2013  3:02:37 PM 
 * e-Mail : dr_chatree@hotmail.com
 * Mobile Phone : (+66) 087-921-5115
 * Package Name : com.tis.database.dao
 * File Name : SdCustomerOutb1Dao.java
 * TODO
 */
package com.tis.database.dao.staging;

import java.math.BigDecimal;
import java.util.List;

import org.hibernate.HibernateException;

import com.tis.database.dao.AbstractDao;
import com.tis.database.entitys.SapMessage;
import com.tis.database.entitys.staging.SdCustomerOutb1;
import com.tis.database.entitys.staging.StampObject;

/**
 * @author Administrator
 *
 */
public interface SdCustomerOutb1Dao extends AbstractDao<SdCustomerOutb1, String> {
	
	/**
	 * @param code
	 * @return
	 * @throws Exception
	 */
	List<SdCustomerOutb1> findCustomerByCode(String code) throws Exception, HibernateException;
	
	/**
	 * 
	 * @param code
	 * @param instanceNo
	 * @return
	 * @throws Exception
	 * @throws HibernateException
	 */
	List<SdCustomerOutb1> findCustomerByInstanceNo(String instanceNo) throws Exception, HibernateException;
	
	/**
	 * 
	 * @param lst
	 * @return
	 */
	List<SdCustomerOutb1> RefreshObject(List<SdCustomerOutb1> lst) throws HibernateException, Exception;
	
	List<SdCustomerOutb1> Search(
									String stagingId,									
									String customerCode,
									String name,
									String idNo,
									String taxId,
									String instanceNo,
									String syncCreatedOnStart,
									String syncCreatedOnEnd,
									int maxResult) throws HibernateException, Exception;
	
	BigDecimal NextSequence() throws HibernateException, Exception;
	
	List<SdCustomerOutb1> findByName(String name) throws Exception, HibernateException;
	
	List<String> NameSplitToSAP(String name) throws Exception, HibernateException;
	
	List<SdCustomerOutb1> UpdateBackSapMessage(List<SapMessage> sapMessages) throws HibernateException, Exception;
	
}
